﻿#region Copyright

//  ======================================================
//      Copyright (c) 2011 Toulr All rights reserved.
//     
//      The use and distribution terms for this software are contained in the file
//      named license.txt, which can be found in the root of this distribution.
//      By using this software in any fashion, you are agreeing to be bound by the
//      terms of this license.
//     
//     You must not remove this notice, or any other, from this software.
//  ======================================================

#endregion

#region Using Namespaces

using System;
using System.ComponentModel.DataAnnotations;
using Toulr.Domains.System;

#endregion

namespace Toulr.Domains.Business
{
    public class Goods:IEntity
    {
        /// <summary>
        ///   记录ID
        /// </summary>
        [Key]
        public Int32 Id { get; set; }

        /// <summary>
        ///   商品名称
        /// </summary>
        [MaxLength(60)]
        public String GoodName { get; set; }

        /// <summary>
        ///   商品描述
        /// </summary>
        [MaxLength(500)]
        public String GoodDescription { get; set; }

        /// <summary>
        ///   商品所属分类Id
        /// </summary>
        public int InfoCategoryId { get; set; }

        /// <summary>
        ///   商品所属店铺Id
        /// </summary>
        public int ShopId { get; set; }

        /// <summary>
        ///   商品原价
        /// </summary>
        public float OriginalPrice { get; set; }

        /// <summary>
        ///   商品现价折扣
        /// </summary>
        public float OfferPriceDiscount { get; set; }

        /// <summary>
        ///   单件商品运费
        /// </summary>
        public float SingleShippingPrice { get; set; }

        /// <summary>
        ///   商品销售数量
        /// </summary>
        public int SaleCount { get; set; }

        /// <summary>
        ///   商品得分
        /// </summary>
        public float Score { get; set; }

        /// <summary>
        ///   参与商品评分人数
        /// </summary>
        public int ScoreUserCount { get; set; }

        /// <summary>
        ///   是否支持退换货
        /// </summary>
        public bool CanReturns { get; set; }

        /// <summary>
        ///   退换货条款说明
        /// </summary>
        [MaxLength(200)]
        public String ReturnsPremise { get; set; }


        #region Associaction Objects
        /// <summary>
        ///   商品所属分类
        /// </summary>
        [NotMapped]
        public virtual InfoCategories InfoCategory
        {
            get { throw new NotImplementedException(); }
        }

        /// <summary>
        ///   商品所属店铺
        /// </summary>
        [NotMapped]
        public virtual Shop Shop
        {
            get { throw new NotImplementedException(); }
        }

        #endregion
    }
}